package vn.ikame.android.boojtran.truyenbua.object;

import android.app.Activity;

import com.google.android.apps.analytics.GoogleAnalyticsTracker;

public class GA {
	// public static GoogleAnalyticsTracker generalTracker;
	public static GoogleAnalyticsTracker appTracker;

	public static void start(Activity activity) {
		// generalTracker = GoogleAnalyticsTracker.getInstance();
		// generalTracker.startNewSession("UA-33515341-2", activity);
		// generalTracker.trackTransactions();

		appTracker = GoogleAnalyticsTracker.getInstance();
		appTracker.startNewSession("UA-33515341-7", activity);
		appTracker.trackTransactions();
	}

	// public static void trackGeneralView(String track) {
	// generalTracker.trackPageView(track);
	// generalTracker.dispatch();
	// }

	public static void trackAppView(String track) {
		appTracker.trackPageView(track);
		appTracker.dispatch();
	}

	// public static void trackGeneralEvent(String cate, String track, int num)
	// {
	// generalTracker.trackEvent("TruyenBua", cate, track, num);
	// generalTracker.dispatch();
	// }

	public static void trackAppEvent(String cate, String track, int num) {
		appTracker.trackEvent("TruyenBua", cate, track, num);
		appTracker.dispatch();
	}

	public static void stop() {
		// generalTracker.stopSession();
		appTracker.stopSession();
	}
}
